package com.onlinemovies.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


@Entity
@Table(name="BookingDetails")
public class BookingDetails implements Serializable {

	
	 private static final long serialVersionUID = 1L;
     
	    @Id
	    @GeneratedValue(strategy=GenerationType.AUTO)
	    @Column(name="id")
	    private long id;
	    
	    @JoinColumn(name = "showid", referencedColumnName = "id")
	    @ManyToOne
	    private ShowDetails showDetails;
	    
	    @Column(name="city")
	    private String city;
	    
	    @Column(name="language")
	    private String language;
	    
	    @Column(name="showdate")
	    private String showdate;
	    
	    @Column(name="showtime")
	    private String showtime;
	    
	    
	    public long getId() {
			return id;
		}

		public void setId(long id) {
			this.id = id;
		}

		
		public String getCity() {
			return city;
		}

		public void setCity(String city) {
			this.city = city;
		}

		public String getLanguage() {
			return language;
		}

		public void setLanguage(String language) {
			this.language = language;
		}

		public Long getNoofseat() {
			return noofseat;
		}

		public void setNoofseat(Long noofseat) {
			this.noofseat = noofseat;
		}

		public Double getPrice() {
			return price;
		}

		public void setPrice(Double price) {
			this.price = price;
		}

		public String getMoviename() {
			return moviename;
		}

		public void setMoviename(String moviename) {
			this.moviename = moviename;
		}

		public MovieDetails getMovieDetails() {
			return movieDetails;
		}

		public void setMovieDetails(MovieDetails movieDetails) {
			this.movieDetails = movieDetails;
		}

		public User getUserDetails() {
			return userDetails;
		}

		public void setUserDetails(User userDetails) {
			this.userDetails = userDetails;
		}

		public HallDetails getHallDetails() {
			return hallDetails;
		}

		public void setHallDetails(HallDetails hallDetails) {
			this.hallDetails = hallDetails;
		}

		@Column(name="noofseat")
	    private Long noofseat;
	    
	    @Column(name="price")
	    private Double price;
	    
	    @Column(name="moviename")
	    private String moviename;
	    
	    
	    
	    @JoinColumn(name = "movieid", referencedColumnName = "id")
	    @ManyToOne
	    private MovieDetails movieDetails;
	    
	    @JoinColumn(name = "userid", referencedColumnName = "id")
	    @ManyToOne
	    private User userDetails;
	    
	    @JoinColumn(name = "locationid", referencedColumnName = "id")
	    @ManyToOne
	    private HallDetails hallDetails;

		public ShowDetails getShowDetails() {
			return showDetails;
		}

		public void setShowDetails(ShowDetails showDetails) {
			this.showDetails = showDetails;
		}

		public String getShowdate() {
			return showdate;
		}

		public void setShowdate(String showdate) {
			this.showdate = showdate;
		}

		public String getShowtime() {
			return showtime;
		}

		public void setShowtime(String showtime) {
			this.showtime = showtime;
		}
}
